package com.minova.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 购物车
 * </p>
 *
 * @author linrongji
 * @since 2019-12-23
 */
@Data 
@EqualsAndHashCode(callSuper=true)
@Accessors(chain = true)
@TableName(resultMap="BaseResultMap")
public class TzBasket extends Model<TzBasket> {

	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		TzBasket tzBasket = (TzBasket)obj;
		return tzBasket.getBasketId().equals(tzBasket.getBasketId());
	}
	
    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "basket_id", type = IdType.AUTO)
    private Long basketId;
    
    /**
//     * 店铺ID
//     */
    private TzShopDetail shopId;

    /**
     * 产品ID
     */
    private TzProd prodId;

    /**
     * SkuID
     */
    private TzSku skuId;

    /**
     * 用户ID
     */
    private TzUser userId;

    /**
     * 购物车产品个数
     */
    private Integer basketCount;

    /**
     * 购物时间
     */
    private LocalDateTime basketDate;

    /**
     * 满减活动ID
     */
    private Long discountId;

    /**
     * 分销推广人卡号
     */
    private String distributionCardNo;
    
    private TzUser tzUser;
    
    private TzProd tzProd;
    
    private TzSku tzSku;
    
    private TzShopDetail tzShop;
    
    

    

	public static long getSerialversionuid() {
		return serialVersionUID;
	}




	@Override
    protected Serializable pkVal() {
        return this.basketId;
    }




	public Long getBasketId() {
		return basketId;
	}




	public void setBasketId(Long basketId) {
		this.basketId = basketId;
	}








	public Integer getBasketCount() {
		return basketCount;
	}




	public void setBasketCount(Integer basketCount) {
		this.basketCount = basketCount;
	}




	public LocalDateTime getBasketDate() {
		return basketDate;
	}




	public void setBasketDate(LocalDateTime basketDate) {
		this.basketDate = basketDate;
	}




	public Long getDiscountId() {
		return discountId;
	}




	public void setDiscountId(Long discountId) {
		this.discountId = discountId;
	}




	public String getDistributionCardNo() {
		return distributionCardNo;
	}




	public void setDistributionCardNo(String distributionCardNo) {
		this.distributionCardNo = distributionCardNo;
	}




	public TzUser getTzUser() {
		return tzUser;
	}




	public void setTzUser(TzUser tzUser) {
		this.tzUser = tzUser;
	}




	public TzProd getTzProd() {
		return tzProd;
	}




	public void setTzProd(TzProd tzProd) {
		this.tzProd = tzProd;
	}




	public TzSku getTzSku() {
		return tzSku;
	}




	public void setTzSku(TzSku tzSku) {
		this.tzSku = tzSku;
	}




	public TzShopDetail getTzShop() {
		return tzShop;
	}




	public void setTzShop(TzShopDetail tzShop) {
		this.tzShop = tzShop;
	}


}
